package com.yonyou.isv.demo.openapi.mobile.service;

import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataResponse;
import com.yonyou.isv.demo.openapi.api.BaseOpenApi;
import com.yonyou.isv.demo.openapi.api.OpenApiURL;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @description: 根据授权code获取用户信息，包括用户所属租户列表
 * @author: nishch
 * @create: 2021-07-15
 **/
@Component
public class MobileApi extends BaseOpenApi {

    public Map<String, Object> getInfoByCode(Map<String, String> params) {
        ApiDataResponse apiDataResponse =  getForEntity(OpenApiURL.USER_INFO_CODE,params, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

}
